New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add option for Context Specific spacebar behavior addressing issue #925 #1803
add option for Context Specific spacebar behavior addressing issue #925 #1803
Conversation
Can one of the admins verify this patch? |
Now, watch. After all my negative Nancy talk about this being impossible to get right, I’ll end up loving it and using it all the time. 😛 I’ve only tested for a few minutes, but it seems to work pretty well. Just a couple of initial observations.
I’ll add this into my build and let you know if I see any other issues. Thanks. |
Ok, how about Smart Spacebar
Sounds good, I never use shift-space and just lazily copied it from the show child contents :)
This was also bugging me although it didn't know how to fix it. Any more info on how i would go about implementing this? I tried the QSTextType but It seems that text files have a public.data file type so I have resorted to searching the object name for ".txt". That works but im not sure if .txt is the only file extension that QS drills into not to mention that it doesn't seem that clean :) |
Better. Thinking about it more, if the user hits
To detect text files in a more flexible way, something like this (untested code) is probably what you want:
You might have to change Don’t hesitate to ask about stuff like that. There are a ton of convenience methods all over the place. |
Something else that might be nice: When in the second pane, jump to the third. Again, this is untested, but I think this will do it: if (self == [self actionSelector]) {
[self shortCircuit:sender];
} That forces it to select a different action if the current one doesn’t have a third pane, which might be a little surprising at first. But since Space wouldn’t do anything else useful in that context, I think it’s fine. If you were happy with the current action, you’d just hit |
Yea i like this idea. I have added this as well as the other updates |
[self togglePreviewPanel:nil]; | ||
} | ||
// Jump to Indirect if search url | ||
else if ([newSelectedObject containsType:QSSearchURLType]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this addition, but it feels too specific. I think we’d want this behavior for anything where the default action expects an argument. I was about to test that locally, but I’ll mention it since you seem to be around. So stealing some code from QSInterfaceController
, you could change the test to
(action && [action respondsToSelector:@selector(argumentCount)] && [action argumentCount] == 2)
And you’d need to do QSAction *action = [[self actionSelector] objectValue]
up above somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, and maybe test that before testing for Quick Look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, which line/case are you referring to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of testing [newSelectedObject containsType:QSSearchURLType]
, use the test above. (I’ve been running it that way and it seems correct.) And then move that behavior up above the Quick Look behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, yea in my setup i don't really come across any dObjects that have more then 1 argument besides search urls. Will plug it in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An easy way to test it is to select an AppleScript file that uses the on process text
feature.
This works pretty well now. Just some small things:
|
- removed Cmd-S shortcut - set Smart as default spacebar behavior
Yea, not sure how that got in there Pushed a commit with the other changes |
Some other small things:
|
…proxy objects - check if objects primary type is a url or search url instead of checking if it simply contains a url. this prevents other objects who use urls to be able to show children like Chrome bookmark folders. Might cause other issues though? - use string constant instead of hard coding value
Can one of the admins verify this patch? |
Here’s an interesting use-case: iTunes tracks. They have children, so that’s what get shown by the spacebar, but Quick Look is probably what you wanted. Any thoughts on how to handle that? |
The logic could be (haven’t thought it through much): if (object is file object type && object is not directory) { I think that for the most part, for anything that’s file-like (has a public.item entry in its data dictionary) and isn’t a directory/symbolic link/package etc. we’d want to quick look the file On 22 Gorff 2014, at 16:34, Rob McBroom notifications@github.com wrote:
|
I was thinking we have a default order in which we check things (which matches the way it works now), but then allow for a new array under One problem with your suggestion off the top of my head is applications. Would you rather Quick Look them, or see recent documents? |
True, maybe a more fine-grain approach as you say is required. Under the hood, not one we expose to the user…! On 23 Gorff 2014, at 13:39, Rob McBroom notifications@github.com wrote:
|
Right. And I’m thinking these overrides would be rare. (I only know of one place where it’s necessary at the moment.) |
Since v1.2 is out the door, we should probably look into this again. Should we get it out as it is, and then let user feedback dictate what exceptions they'd like fixed (like Rob's iTunes track case)? |
See the mailing list for an answer. |
+100 Yes, please can we push this out :) I just upgraded QS for Yosemite and not having this is rough.
|
It should merge cleanly with
Then build QS and you’ll have a copy of 1.2.0 that includes this feature. (Minus the code-signing, so you’ll have to reprove access to Contacts, etc.) |
Thx Rob, I tried running that command but ended up with what seemed like an older version of QS. The search results view was all gray. I think its because i had master set to my own fork. So i tried But got some merge conflicts on LaunchViewController and some .project issues :( Ended just manually copy/pasting the changes back in but it would be great to merge this into the next release. Thx Tony From: Rob McBroom notifications@github.com It should merge cleanly with master, so it’s easy to keep using it. get checkout -b foo master Then build QS and you’ll have a copy of 1.2.0 that includes this feature. (Minus the code-signing, so you’ll have to reprove access to Contacts, etc.) — |
Hey guys, any chance of this PR making it into an upcoming release? |
100% chance, but I don’t know about timing. I’m hoping to take a week off just to work on QS this summer. |
Merged this by hand. It didn’t close, I think because I didn’t have the last commit, but we can live without that. |
Cool, does that mean this will make an appearance in the next release? |
Yes! Thanks for the contribution. I added some enhancements that I thought I had a pull request for, but apparently, I never submitted it. |
I’m updating the credits and I see that we didn’t add you to the list of contributors, @brightOrigin. First, I’m sorry about that, but I’m going to add you now. How would you like to be listed? Your name isn’t attached to your GitHub profile. |
Thx Rob. Full name is Tony Papale. On Oct 22, 2015, 6:17 AM -0700, Rob McBroomnotifications@github.com, wrote:
|
Added an additional option to the spacebar behavior pref panes as detailed here #925